package org.example.springboot14ssm.controller;

import org.apache.ibatis.annotations.Param;
import org.example.springboot14ssm.bean.Vip;
import org.example.springboot14ssm.service.VipService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class VipController {
    @Autowired
    private VipService vipService;
    @GetMapping("/detail")
    public Vip detail(@RequestParam("cn") String cardNumber){
        Vip vip = vipService.getVipBycardNumber(cardNumber);

        return vip;
    }
}
